package com.foreknow.demo5;

import com.foreknow.demo5.MyDate;

public abstract class Employee {
    private String name;
    private int number;
    private MyDate birthday;

    public Employee() {

    }

    public Employee(String name, int number, MyDate birthday) {
        this.name = name;
        this.number = number;
        this.birthday = birthday;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public MyDate getBirthday() {
        return birthday;
    }

    public void setBirthday(MyDate birthday) {
        this.birthday = birthday;
    }

    public abstract double earnings();
    @Override
    public String toString(){
        System.out.println("name:"+ name +"\tnumber:"+number+"\tbirthday:"+birthday.getYear()+"年"+birthday.getMonth()+"月"+birthday.getDay()+"日");
        return "name"+ name +"\tnumber:"+number+"\tbirthday:"+birthday.getYear()+"年"+birthday.getMonth()+"月"+birthday.getDay()+"日";
    }

}
